1. Field of the Invention
The present invention relates to use of a function of which a definition is described in one of a plurality of contents associated with a plurality of frames having a parent-child relationship.
2. Description of the Related Art
A terminal device can divide a screen of a web browser into a plurality of frames, generate a child frame in a screen and display on each frame a web page received from an external information providing system. Web pages (such as, for example, an HTML file or a DHTML file) displayed on these frames can include a program described in a predetermined script language such as JavaScript (registered trademark). The terminal device interprets and executes this program by a web browser and displays a GUI (Graphical User Interface) thereof or the like on a predetermined frame.
In this case, when a predetermined operation is detected by the GUI of a predetermined program (for example, a program providing a calculator function, or the like) displayed on a frame and an execution request of a predetermined function is generated, the terminal device performs predetermined processing based on the definition of a function described in a web page including this program.
In this manner, even when the definition of a function used in a certain frame is changed, it does not affect a function used in other frames. That is, the definition of a function can be changed and used independently in each frame.
On the other hand, as another aspect, the definition of a function used in each frame can be stored in an external file such as a js file, and the stored definition of a function can be used in frames. In this way, the terminal device downloads the js file from the external information providing system according to a “<script>” tag described on a web page displayed on each frame. Then the terminal device associates the definition of a function in the downloaded js file with a frame identifier identifying the frame displaying the web page in which the “<script>” tag is described, and stores them in a memory device such as a RAM.
Here, when the definition of a function with the same name as a function stored in the js file is described in the web page in which the “<script>” tag is described, the terminal device associates the definition of the function in this web page with the frame identifier corresponding to the frame displaying this web page and stores them in a memory device such as a RAM.
FIG. 24 is a diagram conceptually showing information stored in a RAM as a memory device when, for example, a js file in which the definition of a function “funcA(x)=x” is described is specified by “<script>” tags of web pages to be displayed on a frame 0, a frame 1, and a frame 2, and the definition of a function “funcA(x)=x+1” is described on a web page to be displayed on the frame 2.
When a predetermined user operation is detected by a GUI displayed on a frame and an execution request of a predetermined function is generated, the terminal device performs predetermined processing based on the definition of a function associated with the frame identifier corresponding to the frame; and the definition of a function and the frame identifier are stored in the RAM.